Method and apparatus for optimizing the continuous positive airway pressure for treating obstructive sleep apnea

ABSTRACT

A diagnostic device having a nose fitting used without connection to a breathing gas supply for obtaining flow data values at ambient pressure. The nose fitting is connected to a pressure or flow sensor that supplies data values to a microprocessor. The detection and measurement of breathing gas flow is made from a tight sealing nose fitting (mask or prongs) configured with a resistive element inserted in the flow stream as breathing gas exits from and enters into the fitting. The nasal fitting is further provided with a port for connection to a flow or pressure transducer. The resistive element causes a pressure difference to occur between the upstream side and the downstream side when air flows through the element. The data values may be stored in computer memory to be analyzed for flow limitations.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. Ser. No. 09/602,158, filedJun. 22, 2000, now U.S. Pat. No. 6,488,634 which is a continuation ofU.S. application Ser. No. 08/644,371, filed May 10, 1996 (U.S. Pat. No.6,299,581), which is a continuation of U.S. application Ser. No.08/482,866, filed Jun. 7, 1995 (U.S. Pat. No. 5,535,739), which is adivision of U.S. application Ser. No. 08/246,964, filed May 20, 1994(U.S. Pat. No. 5,490,502), which is a continuation-in-part of U.S.application Ser. No. 07/879,578, filed May 7, 1992 (U.S. Pat. No.5,335,654), the contents of which are hereby incorporated herein byreference.

BACKGROUND OF THE INVENTION

This invention relates to a method and apparatus for adjusting thepositive airway pressure of a patient to an optimum value in thetreatment of obstructive sleep apnea, and more particularly to abreathing device which maintains constant positive airway pressure andmethod of use which analyzes an inspiratory flow waveform to titratesuch a pressure value.

Obstructive sleep apnea syndrome (OSAS) is a well recognized disorderwhich may affect as much as 1-5% of the adult population. OSAS is one ofthe most common causes of excessive daytime somnolence. OSAS is mostfrequent in obese males, and it is the single most frequent reason forreferral to sleep disorder clinics.

OSAS is associated with all conditions in which there is anatomic orfunctional narrowing of the patient's upper airway, and is characterizedby an intermittent obstruction of the upper airway occurring duringsleep. The obstruction results in a spectrum of respiratory disturbancesranging from the total absence of airflow (apnea) to significantobstruction with or without reduced airflow (hypopnea and snoring),despite continued respiratory efforts. The morbidity of the syndromearises from hypoxemia, hypercapnia, bradycardia and sleep disruptionassociated with the apneas and arousals from sleep.

The pathophysiology of OSAS is not fully worked out. However, it is nowwell recognized that obstruction of the upper airway during sleep is inpart due to the collapsible behavior of the supraglottic segment duringthe negative intraluminal pressure generated by inspiratory effort.Thus, the human upper airway during sleep behaves as a Starlingresistor, which is defined by the property that the flow is limited to afixed value irrespective of the driving (inspiratory) pressure. Partialor complete airway collapse can then occur associated with the loss ofairway tone which is characteristic of the onset of sleep and may beexaggerated in OSAS.

Since 1981, continuous positive airway pressure (CPAP) applied by atight fitting nasal mask worn during sleep has evolved as the mosteffective treatment for this disorder, and is now the standard of care.The availability of this non-invasive form of therapy has resulted inextensive publicity for apnea and the appearance of large numbers ofpatients who previously may have avoided the medical establishmentbecause of the fear of tracheostomy. Increasing the comfort of thesystem, which is partially determined by minimizing the necessary nasalpressure, has been a major goal of research aimed at improving patientcompliance with therapy. Various systems for the treatment ofobstructive sleep apnea are disclosed, for example, in “Reversal ofObstructive Sleep Apnea by Continuous Positive Airway Pressure AppliedThrough The Nares”, Sullivan et al, Lancet, 1981, 1:862-865; and“Reversal Of The ‘Pickwickian Syndrome’ By Long-Term Use of NocturnalNasal-Airway Pressure”; Rapaport et al., New England Journal ofMedicine, Oct. 7, 1982. Similarly, the article “Induction of upperairway occlusion in sleeping individuals with subatmospheric nasalpressure”, Schwartz et al, Journal of Applied Physiology, 1988, 64, pp.535-542, discusses various polysomnographic techniques. Each of thesearticles are hereby incorporated herein by reference.

Despite its success, limitations to the use of nasal CPAP exist. Thesemostly take the form of discomfort from the mask and the nasal pressurerequired to obliterate the apneas. Systems for minimizing the discomfortfrom the mask are disclosed, for example, in U.S. Pat. Nos. 4,655,213,Rapaport et al, and 5,065,756, Rapaport, as well as in “TherapeuticOptions For Obstructive Sleep Apnea”, Garay, Respiratory Management,July/August 1987, pp. 11-15; and “Techniques For Administering NasalCPAP”, Rapaport, Respiratory Management, July/August 1987, pp. 18-21(each being hereby incorporated herein by reference). Minimizing thenecessary pressure remains a goal of the preliminary testing of apatient in the sleep laboratory. However, it has been shown that thispressure varies throughout the night with sleep stage and body position.Furthermore, the therapeutic pressure may both rise or fall with time inpatients with changing anatomy (nasal congestion/polyps), change inweight, changing medication or with alcohol use. Because of this, mostsleep laboratories currently prescribe the setting for home use of nasalCPAP pressure based upon the single highest value of pressures needed toobliterate apneas during a night of monitoring in the sleep laboratory.Retesting is often necessary if the patient complains of incompleteresolution of daytime sleepiness, and may reveal a change in therequired pressure.

SUMMARY OF THE INVENTION

The invention is therefore directed to a method and apparatus, in asystem for the treatment of obstructive sleep apnea, for optimizing thecontrolled positive pressure to thereby minimize the flow of air from aflow generator while still ensuring that flow limitation in thepatient's airway does not occur. In particular, the invention relates toa breathing device and method of use to adjust a controlled positivepressure to the airway of a patient by detecting flow limitation fromanalysis of an inspiratory flow waveform.

In accordance with the invention, an apparatus for the treatment ofobstructive sleep apnea is provided, comprising a source of air, andmeans for directing an air flow from said source to a patient. This partof the system may be of the type disclosed, for example, in U.S. Pat.No. 5,065,756. In addition, means are provided for sensing the waveformof said airflow, to detect deviations therein that correspond to flowlimitation in the air supplied to the patient. Such deviations may be,for example, deviations from a substantially sinusoidal waveform,flattening, or the presence of plateaus, in the portions of the waveformcorresponding to inspiration of the patient. In response to suchvariations in said airflow, the system of the invention increases ordecreases the pressure to the patient.

In accordance with the method of the invention, the controlled positivepressure to the patient is increased in response to the detection offlow waveform portions corresponding to flow limitations in the patientairway. Such pressure increases may be effected periodically. Similarly,the controlled positive pressure may be periodically decreased in theabsence of such flow limitation. The system may be provided with aprogram that periodically decreases the controlled positive pressure inthe absence of detection of flow limitations in the patient airway, andthat periodically increases the pressure in the presence of detection ofsuch flow limitations.

The method for determining whether to increase or decrease thecontrolled positive pressure is comprised of several steps. The firststep is to detect the presence of a valid breath and store aninspiratory waveform of that breath for further analysis. Next, thewaveform of the stored breath is analyzed regarding its shape forpresence of flow limitation. Whether flow limitation is present is inpart determined by flow limitation parameters calculated from the shapeof the waveforms of the current breath and of the immediately precedingbreath. Once the presence of flow limitation has been analyzed, thesystem determines an action to take for adjustment of the controlledpositive pressure. The pressure setting is raised, lowered or maintaineddepending on whether flow limitation has been detected and on theprevious actions taken by the system.

The preferred breathing device or apparatus consists of a flowgenerator, such as a variable-speed blower, a flow sensor, an analog todigital converter, a microprocessor, and a pressure controller, such asa blower motor speed control circuit, a patient connection hose, a nasalcoupling, such as a nose mask or similar fitting, and, optionally, apressure transducer. Alternative patient circuits may be employed, suchas those disclosed in U.S. Pat. Nos. 4,655,213 and 5,065,756. Forexample, a positive pressure breathing gas source may be connected to apressure control valve proximate the breathing gas source and connectedto a nasal mask having a venting means.

In the preferred embodiment, the blower supplies air through the flowsensor to the patient via a hose and nasal coupling. The microprocessorobtains the flow waveform from the digitized output of the flow sensor.Using the method of the present invention described herein, themicroprocessor adjusts the speed of the blower via the motor controlcircuit to change the air pressure in the patient supply hose. Apressure transducer may be provided to measure the actual pressure inthe patient hose. In addition, the microprocessor may store measuredpressure and flow waveform values in its data memory to provide ahistory for real-time or off-line processing and analysis.

Other features and advantages of the present invention will becomeapparent from the following detailed description, taken in conjunctionwith the accompanying drawings, which illustrate, by way of example, theprinciples of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is the waveform of the airflow of a 30 second epoch to a sleepingpatient from a CPAP generator, with a CPAP pressure of 10 cm H₂O.

FIG. 2 is the waveform of the airflow of a 30 second epoch to thesleeping patient of FIG. 1, from a CPAP generator, with a CPAP pressureof 8 cm H₂O.

FIG. 3 is the waveform of the airflow of a 30 second epoch to thesleeping patient of FIG. 1, from a CPAP generator, with a CPAP pressureof 6 cm H₂O.

FIG. 4 is the waveform of the airflow of a 30 second epoch to thesleeping patient of FIG. 1, from a CPAP generator, with a CPAP pressureof 4 cm H₂O.

FIG. 5 is the waveform of the airflow of a 30 second epoch to thesleeping patient of FIG. 1, from a CPAP generator, with a CPAP pressureof 2 cm H₂O.

FIG. 6 is a simplified cross sectional view of a Starling resistor.

FIG. 7 is a simplified block diagram of an experimental setup employinga Starling resistor.

FIG. 8 is a set of waveforms generated by use of the setup of FIG. 7.

FIG. 9 is a simplified block diagram of a system in accordance with theinvention.

FIG. 10 is a flow diagram illustrating one technique for adjusting theCPAP pressure, in accordance with the invention.

FIG. 11 is a transition diagram of a three phase state machine withstates corresponding to the phases of respiration.

FIG. 12 is a plot of a total flow signal depicting the state transitionsshown in FIG. 11.

FIG. 13 is a set of waveforms used to correlate an inspiratory wave witha sinusoidal half wave.

FIG. 14 shows a regression fit to a mid-third of an inspiratory wave andto a sinusoidal half wave.

FIG. 15 is a plot of a total flow signal and a derivative of aninspiratory waveform depicting a respiratory effort index.

FIG. 16 contains a table of the probability factors used to modify theflow limitation parameters.

FIG. 17 is a flow diagram illustrating one technique for determiningwhether and how to adjust the controlled positive pressure, inaccordance with the invention.

FIG. 18 is a detailed block diagram of a therapeutic apparatus inaccordance with the invention.

FIG. 19 is a detailed block diagram of a diagnostic system in accordancewith the invention.

FIG. 20 is a perspective view of a nose fitting for diagnostic use withthe method of the present invention.

FIG. 21 is a partial cross-sectional view of a nose fitting fordiagnostic use with the method of the present invention.

FIG. 22 is a flow diagram illustrating a method of diagnosing andtreating a patient in accordance with the invention.

DETAILED DISCLOSURE OF THE INVENTION

FIGS. 1-5 illustrate the waveforms of flow from a CPAP generator,obtained during the testing of a patient, in sleep studies. In thesetests, the patient was wearing a CPAP mask connected to an air source,in the manner illustrated in U.S. Pat. No. 5,065,765. Each of thesetests illustrate an epoch of 30 seconds, with the vertical linesdepicting seconds during the tests. FIGS. 1-5 depict separate sweepsthat were taken from 1 to 2 minutes apart, and with different pressuresfrom the source of air.

FIG. 1 illustrates a “normal” waveform, in this instance with a CPAPpressure of 10 cm H₂O. This pressure was identified as corresponding toapnea free respiration. It is noted that this waveform, at least in theinspiration periods, is substantially sinusoidal. The waveforms of FIGS.2-5 illustrate that, as the controlled positive pressure is lowered, apredictable index of increasing collapsibility of the airway occurs,prior to the occurrence of frank apnea, periodic breathing or arousal.

When the CPAP pressure was decreased to 8 cm H₂O, as illustrated in FIG.2, a partial flattening of the inspiratory flow waveform, at regions 2a, began to occur. This flattening became more definite when thecontrolled positive pressure was decreased to 6 cm H₂O, as illustratedby the reference numeral 3 a in FIG. 3. The flattening becomes even morepronounced, as seen at the regions 4 a of FIG. 4, when the controlledpositive pressure was reduced to 4 cm. Reductions in the CPAP pressurefrom the pressure of apnea free respiration resulted in snoring by thepatient. When the controlled positive pressure was reduced to 2 cm H₂O,as illustrated in FIG. 5, there was virtually zero inspiratory flowduring the inspiratory effort, as seen at the portions 5 a. Shortlyafter the recording of the waveform of FIG. 5, the patient developedfrank apnea and awakened.

The waveforms of FIGS. 1-5 are consistent with experiments wherein thecollapsible segment of the air passage is simulated by a Starlingresistor. A Starling resister 10, as illustrated in FIG. 6, is comprisedof a rigid external tube 11 supporting an internal collapsible tube 12.Water is introduced into the space between the outer tube 11 and innertube 12, for example, through a tube connected to a water column 13 ofadjustable height to enable variation of the external pressure appliedto the collapsible tube 12. With reference to FIG. 7, in thisexperiment, a commercial CPAP flow generator 14 is coupled to the“distal” end of the Starling resistor 10, and “respiration” is simulatedby a sinusoidal pump 15 coupled to the “proximal” or “intrathoracic” endof the resistor 10. A volume reservoir 16 is coupled to the proximal endof the Starling resistor, to provide a capacitive volume that preventsexcessive negative pressure from developing during total systemocclusion (apnea).

The flow tracing of FIG. 8 was generated using the system of FIG. 6,with the level of water in the column 13 set between 5 and 15 cm H₂O.The airflow from the CPAP flow generator was started at a pressure of 14cm H₂O, then sequentially decreased to 12 cm, 11 cm, 8 cm and 6 cm H₂O,and finally returned to 13 cm H₂O. In FIG. 8, the upper curve shows thewaveform of the airflow, the middle curve shows the waveform of theproximal pressure (i.e., at the port of the sinusoidal generator 15, andthe lower curve illustrates the CPAP pressure. The gradations at the topof FIG. 8 denote seconds. FIG. 8 thus reflects the large increase inresistance across the Starling resistor, and mimics the increasinglynegative intrathoracic pressure routinely seen in patients with anapnea, snoring and any increased upper airway resistance syndrome.

In accordance with the invention, waveforms of the flow of air, of thetype illustrated in FIGS. 1-5, are employed in order to control the flowof air from a CPAP generator, to thereby minimize the flow of air fromthe generator while still ensuring that flow limitation does not occur.

In one embodiment of the invention, as illustrated in FIG. 9, a CPAPmask 20 is connected via tube 21 to receive air from a CPAP flowgenerator 22. These elements may be of the type disclosed in U.S. Pat.No. 5,065,756, although the invention is not limited thereto, and anyconventional CPAP system may alternatively be employed. A conventionalflow sensor 23 is coupled to the tube 21, to provide an electric outputsignal corresponding to the waveform of the airflow in the tube 21. Thissignal is applied to a signal processor 24, which detects the existencein the waveforms of conditions that indicate flow limitation. The signalprocessor 24 outputs a signal to a conventional flow control 25 forcontrolling the pressure applied by the flow generator to the tube 21.It is of course apparent that, depending upon the type of flow generator22, the signal processor may directly control the flow generator,instead of controlling a flow control device 25.

One method for adjusting the CPAP pressure in accordance with theinvention is illustrated in FIG. 10. After the CPAP mask has been fittedto a patient and the CPAP generator has been connected to the mask (step40), the CPAP pressure is set at a starting pressure. This pressure is apressure at which flow limitation for the patient does not occur. Aftera settling period of about 30 seconds (step 41), the flow signal isanalyzed (step 42).

If it is determined that flow limitation has occurred (step 43) and thatthe CPAP pressure is less than the maximum allowed (step 44), then theCPAP pressure is increased by 0.5 cm H₂O (step 45) and the methodreturns to the settling step 41 for further processing. If at thepressure comparing step 44 the pressure was not less than the maximumallowed CPAP pressure, then the method returns to the settling step 41without increasing the CPAP pressure.

If it was determined that a flow limitation was not present (step 43),then a determination is made (step 46) whether a predetermined time haselapsed following the last change in the CPAP pressure. Thepredetermined time may be, for example, two minutes. If thepredetermined time has not elapsed, then the method returns to thesettling period step 41. If the predetermined minimum time has elapsed,it is determined whether the CPAP pressure is greater than the minimumallowed pressure (step 47). If it is greater than the minimum allowedpressure, then the CPAP pressure is decreased by 0.5 cm H₂O (step 48),and the method returns to the settling step 41. Otherwise, the returnsto the settling step 41 without decreasing the CPAP pressure.

While the above described example of the method of the inventionemployed CPAP pressure change steps of 0.5 cm H₂O, it is apparent thatthe invention is not limited to pressure changes of this magnitude. Inaddition, the pressure changes may not necessarily be equal throughoutthe range of adjustment.

Similarly, the flow limitation determination step 43 may involve any ofa number of waveform analysis procedures. For example, the signalcorresponding to the airflow waveform may be differentiated in theportions thereof corresponding to inspiration. A markedly peaked resultfrom such differentiation indicates the presence of flow limitation, asis evident from an analysis of the differentials of the waveforms ofFIGS. 1-5. Alternatively, the waveform may be analyzed for the presenceof harmonics of the cyclic rate of the waveform in the inspirationperiod thereof, since the presence of a significant amplitude ofharmonics of the cyclic rate (i.e., the breathing rate) indicates thepresent of a waveform indicative of flow limitation. It is evident thatanalyses of this type may be effected by conventional hardware orsoftware. The invention, however, is not limited to the above specifictechniques for determining divergence of the waveform from the normalnon-flow limited waveform to a waveform indicating the presence of flowlimitation.

The optimizing method for determining whether to increase or decreasethe controlled positive pressure is comprised of several steps. Thefirst step is to detect the presence of a valid breath and store datavalues corresponding to an inspiratory flow waveform of that breath forfurther analysis. Alternatively, flow data values may be stored for theentire breath. Next, the stored breath waveform is analyzed regardingits shape for presence of flow limitation. Whether flow limitation ispresent is in part determined by flow limitation parameters calculatedfrom the shape of the waveforms of the current breath and of theimmediately preceding breath. Once the presence of flow limitation hasbeen analyzed, the system determines an action to take for adjustment ofthe controlled positive pressure. The pressure setting is raised,lowered or maintained depending on whether flow limitation has beendetected and on the previous actions taken by the system.

The optimizing method has several input parameters which are used in thedetermination of the action to be taken during the automatic adjustmentmode. For example, the initial controlled positive pressure, or “startvalue,” must be available for use when power-on occurs in the breathingdevice. Similarly, the method requires a “therapeutic level” ofcontrolled positive pressure to return to whenever an exceptioncondition is detected, such as high constant flow. If the method cannotdetermine with reasonable certainty that breathing is present, itreturns the controlled positive pressure to the prescribed therapeuticlevel. Also, a “low limit” and a “high limit” are required to determinethe minimum and maximum controlled positive pressure level the systemwill generate when operating in the automatic adjustment mode. Themethod cannot cause the controlled positive pressure to exceed themaximum or minimum limits of pressure.

The method for optimizing the controlled positive pressure will now bedescribed in more detail. The first step in the optimizing method is thedetection of a valid breath. A valid breath is determined by a cyclicalfluctuation in the respiratory signal superimposed on the constantsystem leak. This detection is implemented using a three phase statemachine with states corresponding to the phases of patient respiration.The transition diagram of this state machine is shown in FIG. 11 anddescribed below. As is well known in the art, the logic for the statemachine may be programmed into the software of a microprocessor orsimilar computer hardware.

The total flow signal present within the positive pressure flowgenerator is used as a basis for the breath detection method steps. Thebreath detection method produces measured data corresponding to theinspiratory flow waveform. Similarly, the breath detection methodestimates the constant leak flow and determines several breathdescription parameters, which are described in more detail below. Thesemeasured and calculated data form the input to the flow limitationdetection step of the optimizing method.

As shown in FIG. 12, the state machine uses the actual flow signal fromthe controlled positive pressure source and two derived reference flowsignals to determine state transitions. The first state of the statemachine is the inspiratory state (INSP). The second state is theexpiratory state (EXP). In the third state (PAUSE), the state machine isin transition from INSP to EXP, or from EXP to INSP. The onset of anINSP state defines the beginning of a valid breath.

Likewise, the onset of the next INSP state defines the end of a validbreath.

The four state changes (C1, C2, C3, and C4), are shown in FIGS. 11 and12. The first state change (C1), is determined by the state machinemoving from the PAUSE state to the INSP state. This transition denotesthe completion of the preceding breath, which is processed beforeproceeding to the next breath. The data collected and calculated for abreath is discarded if it does not meet certain preprogrammed minimaltime and amplitude criteria. The first transition occurs whenever thesystem is in PAUSE and the total flow signal exceeds the sum of acalculated average leak value (ALV) plus a calculated safety value(SAFE) used as a dead-band. In addition, the derivative of the flowsignal must be greater than a minimum set value. This criteria enablesthe system to differentiate between the onset of inspiration and merechanges in flow leakage in the breathing device.

The average leak value (ALV) is a calculated running average of theactual flow signal modified to reflect the possible absence of anexpiratory signal. The estimate of the average leak flow is updatedduring each of the three phases INSP, EXP, PAUSE. The safety referencevalue (SAFE) is the level of fluctuation in the flow signal which isconsidered noise. This is calculated as an average of a fraction of thepeak flow in each breath. Alternatively, the total flow signal may befirst differentiated and then integrated to remove the constant DCoffset component (leak flow) and the value of ALV set to zero. Also, themethod steps may be applied to the estimated flow signal output of aCPAP generator (which has the constant leak value subtracted out) andthe ALV set equal to zero.

In the second transition (C2), the machine state changes from the INSPstate to the PAUSE state. This transition occurs when the system is inthe INSP state and the total flow signal drops below the ALV. In thenext transition (C3), the state machine changes from the PAUSE state tothe EXP state. This transition occurs when the system is in the PAUSEstate and the total flow signal drops below the ALV minus SAFE referencevalue. Lastly, the state machine transitions from the EXP state to thePAUSE state (C4). This transition occurs when the system is in the EXPstate and the total flow signal rises above the ALV.

The system performs certain calculations during the phase states (INSP,EXP, PAUSE) and phase transitions (C1, C2, C3, C4). During theinspiratory phase (INSP), the system accumulates and stores measureddata of total flow, e.g., in a flow buffer. Also during the inspiratoryphase, the system determines the maximum inspiratory flow value and themaximum derivative value for the total flow signal. During theexpiratory phase (EXP), the system determines the maximum expiratoryflow value.

During the first transition (C1), the system determines whether thecurrent breath meets the valid criteria for time and size. At the sametime, the system calculates a new safety value (SAFE) as a fraction ofthe breath size. During the second transition (C2), the systemdetermines the inspiratory time and calculates the running average ofthe maximum derivative. During the fourth transition (C4), the systemcalculates the expiratory time.

The determination of the degree of flow limitation present is based onfour shape detection parameters, the sinusoidal index, the flatnessindex, the respiratory effort index and the relative flow magnitudeindex. The sinusoidal parameter or index is calculated as a correlationcoefficient of the actual total inspiratory flow wave (filtered) to areference sinusoidal half wave. As shown in FIG. 13, a half sinusoidaltemplate 50 that matches the timing and amplitude of the actual totalinspiratory flow data is compared to the actual total inspiratory flowdata, for example, using a standard Pearson product moment correlationcoefficient. This correlation coefficient is an index ranging from 1(sinusoidal or not flow limited) to 0 (not sinusoidal).

A typical non-flow limited shape 52 and flow limited shape 54 are shownin FIG. 13 for comparison. The comparison may be applied to an entireinspiratory waveform (halfwave) or to the mid-portion whose shape ismost characteristic of either normal or flow limited breaths. Thepreferred section of the inspiratory waveform is that which is mostdiscriminate between normal and flow limited behavior, for example, themid-portion of the inspiratory flow data.

The flatness parameter is a representation of the degree of flatness (orcurvature) present in the total inspiratory flow signal. This index iscalculated as a variance ratio of the actual signal around a calculatedregression line (actual curvature) and an ideal half sinusoidal signalaround the same regression line (curvature standard). As shown in FIG.14, the regression (REGR) is calculated using the mid-portion of theinspiratory flow data 56, for example, from the end of the first thirdof the inspiratory portion of the breath T0 to the beginning of the lastthird of the inspiratory portion of the breath T1. This regression iscalculated using least squares techniques. The variance of the actualtotal inspiratory flow data 56 around this regression line is thencalculated for the mid-portion of the inspiration. Likewise the varianceof the mid-portion of a pure half sinusoidal template with matchingperiod and amplitude around the regression line is also calculated. Theratio of these two variances produces the flatness parameter or indexwhich ranges from 1 (sinusoidal) to 0 (flat).

The system calculates the respiratory effort index as the ratio of peakderivative (rate of change of flow with respect to time) of the earlyinspiratory waveform to the peak flow value of the inspiratory waveform.FIG. 15 shows the peak (A) of the total inspiratory flow waveform asplotted against the peak (B) of the waveform for the derivative of theinspiratory flow. The ratio of the peak values (B/A) is also known asthe “effort index.” This parameter is useful to detect flow limitationin a patient, because an increased respiratory effort is manifested inan increased slope of the inspiratory flow waveform.

The system calculates the relative flow magnitude index as the peak flowof the inspiratory flow waveform minus the peak flow of the previousinspiratory flow waveforms showing flow-limitation divided by therunning average of the peak flows of the non-limited breaths minus theaverage of the flow-limited breaths. This parameter is calculated as:${{MIN}\quad {MAX}} = \frac{{FLOW} - {MIN}}{{MAX} - {MIN}}$

WHERE:

FLOW is the peak flow rate of the current breath

MIN is an average of the peak flow of the 20 most recent flow limitedbreaths.

MAX is an average of the peak flow of the 20 most recent normal breaths.

This results in a parameter or index which ranges from 0 (flow limited)to 1 (normal).

The four shape detection parameters described above are calculated forthe current valid breath and the values are combined using amathematical function, such as a logistic regression sum. Similarly,weighting factors may be used, wherein the weight given to one or moreof the indexes may be zero, positive or negative. The combined valuesprovide a flow limitation parameter which has a value between 0 and 1that characterizes the likelihood that the current breath has a shapecharacteristic of flow-limitation. The value of the flow limitationparameter is further modified based on the value of the precedingbreaths' flow limitation parameters used as a prior probability,allowing calculation of a posterior probability.

The four shape detection parameters (sinusoidal index, flatness index,respiratory effort index and relative flow magnitude index) are used ina mathematical function to determine a likelihood of flow limitationusing a logistic regression equation:$p = \frac{^{f{(x)}}}{1 + ^{f{(x)}}}$

Where “p” is the probability of flow limitation; “e” is the base of thenatural logarithms; X1, X2, X3 and X4 are the shape detectionparameters; B0, B1, B2, B3 and B4 are the weighting coefficients (whichmay include zero) and

f(x)=B _(o) +B ₁ *X ₁ +B ₂ *X ₂ +B ₃ *X ₃ +B ₄ *X ₄.

The probability of flow limitation (p) has a limited range from 0 (flowlimitation) to 1 (normal) and is valid for all values of the functionf(x).

FIG. 16 shows the prior probability factor which is applied to theinitial value of the flow limitation parameter calculated from the shapeparameters to yield a final value for the current valid breath. Theprior probability factors are used to modify the flow limitationparameter based on previous breath's value for flow limitation. Theunderlined value is an estimate of the best value to be used as amultiplicative or additive to the index. Thus, the flow limitationparameter is made more important when other flow limited breaths havebeen detected. Similarly, the index is made less “flow limited” if thepresent occurrence is an isolated incident.

If the flow limitation parameter is between 1 and a predetermined normalreference value, e.g., 0.65-0.8, then the breath is classified as“normal.” If the flow limitation parameter is between 0 and apredetermined flow limited reference value, e.g., 0.4, then the breathis classified as “flow limited.” If the flow limitation parameter isbetween the normal and flow limited reference values, then the breath isclassified as “intermediate.”

As each valid breath is identified, its likelihood of being flow limitedis calculated. The flow limitation parameter approaches a value of 1 fora normal breath and 0 for a flow limited breath. In the method of thepresent invention, a decision is made as to whether to adjust thecontrolled positive pressure. This decision is dependent on threefactors:

1) the value of the flow limitation parameter for the current breath;

2) the value of the flow limitation parameters in the preceding interval(several breaths);

3) whether the controlled positive pressure has been adjusted (and thedirection) in the preceding interval of time.

Generally, if flow limitation is detected, the controlled positivepressure will be raised. Similarly, if no flow limitation is detectedfor an interval of time, then the controlled positive pressure islowered to test for the development of flow limitation. The desiredeffect of the method of the present invention is for the controlledpositive pressure to remain slightly above or below the optimal positivepressure despite changes in the optimal therapeutic level of pressurewhich may occur over time.

As shown in the flow chart of FIG. 17, the method of the presentinvention uses a decision tree to determine whether to change thecontrolled positive pressure to the airway of the patient. The steps ofthe method may be programmed in the software of a microprocessor orsimilar computer. As part of the decision process, the system calculatesa time weighted majority function (MF) from the flow limitationparameter values for a certain number of previous breaths, e.g., three,five or ten breaths depending on the type of current breath. Dependingon the combination of parameters, the controlled positive pressure israised or lowered a large (1.0 cm) or small (0.5 cm) step, returned tothe value prior to the last change or left unchanged from the lastvalue.

If there has been no change (NC) in the controlled positive pressure forthe past interval, the present breath is normal (N) and the majorityfunction is normal, then the controlled positive pressure is lowered bya large step (LOWR LG). If, however, the present breath is intermediate(I) and the majority function is intermediate or flow limited (FL), thenthe controlled positive pressure is raised by a small step (RAISE SM).Similarly, if the present breath is flow limited, then the controlledpositive pressure is raised a small step if the majority function isintermediate and by a large step (RAISE LG) if the majority function isflow limited. Else, no change is made to the controlled positivepressure.

If the controlled positive pressure has been lowered in the pastinterval, the present breath is normal and the majority function isnormal, then the controlled positive pressure is lowered by a large step(LOWER LG). If, however, the present breath is intermediate or flowlimited and the majority function is intermediate or flow limited, thenthe controlled positive pressure is raised to the previous level (RAISEPV). Else, no change is made to the controlled positive pressure.

If the controlled positive pressure has been raised in the pastinterval, no action is taken for a period of time, e.g., breaths. Thenif the present breath is normal and the majority function is normal, thecontrolled positive pressure is lowered by a small step (LOWR SM).Conversely, if the present breath is intermediate or flow limited, thenthe controlled positive pressure is raised by a small step if themajority function is intermediate and by a large step if the majorityfunction is flow limited. Else, no change is made to the controlledpositive pressure.

In addition, the detection of apneas is used to initiate the decision toraise the controlled positive pressure. If two apneas of a duration often seconds or longer occur within one minute, then the controlledpositive pressure is raised. If one long apnea having a duration oftwenty seconds or longer occurs, then the controlled positive pressureis raised. If an apparent apnea is associated with a very high leakflow, implying a condition of mask disconnect, then the controlledpositive pressure is returned to a predetermined or preset pressure.

Alternatively, the controlled positive pressure may be continuouslyadjusted at a rate set by a slope parameter, e.g., 0.1 cm per twoseconds. The slope parameter and its sign would then be updated based oneach breath's flow limitation parameter. In no event can the controlledpositive pressure be set below the low limit or above the high limitreference values.

FIG. 18. shows an alternative therapeutic apparatus in the spirit of thepresent invention. The breathing device 70 is composed of a flow sensorcircuit 72 which senses the flow rate of the breathing gas in the tubingor hose 74 leading to the patient. The flow sensor produces an analogoutput voltage proportional to the breathing gas flow rate which isconveyed via multiplexer 76 to an analog to digital converter circuit 78which produces a digital output value which is proportional to theanalog voltage output from the flow sensor.

A microprocessor 80 with associated memory 81 and other peripheralcircuits executes computer programs which implement the optimizingmethods heretofore described. The microprocessor or similar computingdevice uses the digital output values from a multiplexer 76 and ananalog-to-digital converter 78. The microprocessor produces a speedcontrol signal which adjusts a motor speed control circuit 82 whichcontrols the speed of a blower motor 84. Similarly, the variable-speedmotor drives the fan blades of a blower 86 which supplies the air flowto the patient through or past the air flow sensor 72. The speed of theblower determines the pressure in the patient circuit. Thus, themicroprocessor is able to adjust the pressure of the patient circuit 70in response to the data values from the flow sensor.

The breathing device 70 may also incorporate a pressure sensor circuit90 to allow the microprocessor 80 to obtain a direct measurement of thepressure in the patient tubing 74 via the analog to digital convertercircuit 78. Such a configuration would allow the microprocessor tomaintain the pressure within the maximum and minimum pressure limitsestablished by the prescribing physician. The actual operating pressurelevels can be stored in the memory 81 of the microprocessor every fewminutes, thus providing a history of pressure levels during the hours ofuse when the stored data values are read and further processed by aseparate computer program.

A signal representative of the speed of the blower could be stored inmemory instead of the pressure data values; however, such speed valuesdo not change as rapidly as measured pressure values. If the blowerpressure versus speed characteristics are suitable, i.e., approximatelyconstant pressure at a given speed regardless of the air flow rate, thenthe pressure sensor circuit may be eliminated, thereby reducing the costto produce the apparatus and making it affordable by a greater number ofpatients. Alternatively, a patient circuit having a positive pressurebreathing gas source and pressure control valve, as disclosed in U.S.Pat. No. 5,065,756, may be used.

The methodology for detecting flow limitation can be applied by anautomated or manual analysis of the inspiratory flow waveform from thepositive pressure generator or from any measurement of the inspiratoryflow waveform. Thus the method and apparatus heretofore described may beused for diagnostic purposes in a hospital, sleep lab or the home.Detection and measurement of inspiratory and expiratory flow can be froma standard CPAP system with a flow signal output or by a diagnosticsystem 100 as shown in FIG. 19. Data values representative of themeasured inspiratory and expiratory flow can be logged by amicroprocessor 110 in various forms of computer memory 114.

As shown in FIGS. 20 and 21, the detection and measurement of breathinggas flow is made from a tight sealing nose fitting 102 (mask or prongs)configured with a resistive element 106 inserted in the flow stream asbreathing gas exits from and enters into the fitting. The nasal fittingis further provided with a port 108 for connection to a flow or pressuretransducer 104. The resistive element causes a pressure difference tooccur between the upstream side and the downstream side when air flowsthrough the element. The magnitude of the pressure difference isproportional to the magnitude of the flow of the air through theresistive element. By continuously measuring the pressure difference,the measurement of the air flow through the resistive element iseffectively accomplished. In the preferred embodiment, the pressuremeasurement is made between the inside of the nose fitting and theambient pressure in the room. Additional details regarding theconstruction of such a nose fitting may be found in U.S. Pat. No.4,782,832, incorporated herein by reference.

An alternative nose fitting may consist of a tight fitting nasal masksuch as that disclosed in U.S. Pat. No. 5,065,756. An improved mask sealmay be achieved by using a ring of dual sided adhesive tape formed in aring or oval along the perimeter of the mask where the nasal maskcontacts the patient. In addition, the perimeter of the nasal mask maybe configured with a pliable material which would conform to the shapeof the face of the patient. A vent and flow restrictor may be configuredin the mask and placed in fluid communication with a flow and/orpressure sensor or transducer.

In FIGS. 20 and 21, a nasal prong 102 has been configured with a meshscreen resistor 106 at the air inlet, which creates a pressure signalwithin the nasal prong proportional to the air flow through the nasalprong. Although the figures show an external pressure transducer 104coupled to the nose fitting by flexible tubing 108, the pressuretransducer could be embedded within the structure of the nose fitting,thereby sensing the pressure difference between the inside and outsideof the nose fitting. Pressure and flow data values may be continuouslymeasured and recorded on a data logging device such as a microprocessor110 having program memory 111 and a storage medium 114. Thus, therecorded flow signal may be analyzed during or after collection tocategorize breaths as described heretofore.

Such an analysis can be tabulated in several ways, which permit eitherdiagnosis of subtle elevations of upper airway resistance (not resultingin frank apnea) or to adjust a single prescription pressure of CPAP in awell standardized manner either in the laboratory or on the basis ofhome studies. Possible tabulations of percent time or numbers of breathswith normal, intermediate, and flow limited contours may include time ofnight, patient position (which can be recorded simultaneously with aposition sensor 112 in the mask or on the patient's body), sleep stage(as recorded separately) and controlled positive pressure.

The controlled positive pressure could be constant throughout the nightor varied in several ways to gain diagnostic and therapeutic informationof relevance to a patient's condition. For example, the controlledpositive pressure could be changed throughout a night manually in thesleep laboratory by a technician. Similarly, the controlled positivepressure could be changed automatically via an automated system, eitherin response to feedback control or using pre-set ramps or steps in thecontrolled positive pressure throughout the night (in laboratory or athome). Likewise, the controlled positive pressure could be changed onmultiple individual nights, e.g., at home.

As shown in FIG. 18, the flow waveforms may be recorded in a recordingdevice, such as a microprocessor 80 with associated memory 81. Asheretofore described, data values may be recorded while the patient isusing a self-adjusting controlled positive pressure apparatus describedherein. Similarly, data values may be recorded while the patient isconnected to a constant-pressure air supply having a flow sensor. Suchflow waveforms are obtained at positive airway pressures above ambientpressure. However, to determine the frequency and severity of flowlimitations and apnea in a patient who is not receiving therapy, it isnecessary to obtain flow waveforms when the patient is breathing atambient pressure.

FIGS. 19, 20 and 21 illustrate a device of the present invention whereina nose fitting 102 is used without connection to a breathing gas supplyfor obtaining flow data values at ambient pressure. The nose fitting isconnected to a pressure or flow sensor 104 which supplies data values toa microprocessor 100 via a multiplexer 166 and analog-to-digitalconverter 118. Software for storing and analyzing the data may be storedin read-only program memory 111, while the data values are stored inrandom-access memory or non-volatile memory 114. Additionally, anoximeter 120 and/or similar diagnostic devices may be connected to thepatient and multiplexer for generating additional data values for useand storage by the microprocessor.

An alternative nasal connection could be achieved by using a “standard”nasal cannula commonly used for supplying supplemental oxygen therapy topatients. Such a cannula does not provide a seal between the nasal prongand the naris, so it does not capture all the air flowing to and fromthe patient. However, it does capture the small pressure fluctuations inthe nares and transmit them to an attached pressure sensor to provide asignal representative of the actual flow waveform shape.

The recording device may be configured with a microprocessor 110 whichuses a sample-and-hold circuit, and an analog-to-digital converter 118to digitize samples of analog voltage signals at a suitable rate andresolution to capture relevant waveform detail, e.g., fifty samples persecond rate and resolution of one part in 256 (“eight bit”) forbreathing flow waveforms. The digitized samples are then stored intime-sequential order in a non-volatile memory device 114, e.g. magneticdisk drive, “flash” memory, or battery-backed random-access memory.

In order to record more than one signal, e.g. flow and pressurewaveforms and position signal, in time-correlated sequence, theindividual signals can be repetitively sequentially connected to thesample-and-hold circuit by a multiplexer circuit 116. All of theserecording device circuit and devices are well known to one skilled inthe art of electronic circuit design, and can readily be obtainedcommercially.

In order to enhance the diagnostic potential of this flow waveformsensing and analyzing technique, the flow sensor 104 could be combinedwith a position sensor 112 to determine the dependence of positionattributes of the flow limitation. Likewise, adding pulse oximetry 120,which measures the oxyhemoglobin saturation level in the patient'sblood, to the flow and position measurements would provide a very usefulcombination of diagnostic signals, adequate to diagnose and document theseverity of the upper airway obstructions.

The following describes a method of diagnosing and treating obstructivesleep apnea and upper airway resistance syndrome using the methods andapparatus for determining flow limitation in a patient as heretoforedescribed. At present, a patient seeking physician treatment hassymptoms of excessive sleepiness and possibly snoring, in spite of thepatient apparently spending enough time in bed to provide adequatesleep. Such symptoms may or may not be indicative of obstructive sleepapnea and require further analysis, typically in an overnight stay in asleep lab. Under the present invention, the physician provides thepatient with a diagnostic device for use during sleep at home. Thediagnostic system records flow and pressure waveforms as previouslydescribed, using a nose mask, nasal cannula or similar nasal fittinghaving a flow restrictor and a pressure and or flow transducer.

While the patient is using the diagnostic device at home, the digitizedwaveforms are stored in nonvolatile memory such as flash memory, floppyor hard disk, or battery-powered random-access memory (RAM). One or twoadditional measurements may optionally be recorded: patient sleepingposition from a position sensor on the patient, and blood oxyhemoglobinsaturation level (in percent SaO₂) from a device such as a pulseoximeter. Since the value of these two measurements do not changerelatively rapidly (one value per second for each additional measurementversus fifty values per second for flow), the memory storagerequirements would not be increased significantly.

After using the diagnostic device to record the desired parameters whilesleeping for one or more nights, the patient returns the device or datastorage unit, e.g., a disk or non-volatile memory card, to thephysician. The physician extracts the data from the storage, andanalyzes it to determine the amount of flow limitation and apneapresent, along with the other two parameters, if they were recorded. Theresulting analysis is used to determine whether the patient needs a moredetailed sleep study (in a sleep lab or in the home), or whether therapyshould be started without further studies.

If the decision is to start therapy because sufficient flow limitationand/or apnea is present, the patient is provided with a self-adjustingtherapy device for home use of the method of the present inventiondescribed heretofore. The home therapy device also incorporates arecording component which records flow, pressure and one or two optionalparameters as described above. After using this therapy device duringsleep for one or more nights, the data is returned to the physician. Thephysician analyzes it to document the reduction of flow limitation andapnea achieved by the therapy device, to document the reduction in SaO₂desaturations if the optional parameter was recorded, and to determinewhether the patient's condition could be effectively treated by a lessexpensive therapy device which is not self-adjusting, for examplestandard continuous positive airway pressure.

The patient is then given the appropriate therapy device, or, ifanomalies in the breathing pattern are observed during the recordedtherapy nights, the patient may be referred for a more extensive sleepstudy. After the patient has been using the therapy device for severalweeks or months, a repeat use of the self-adjusting therapy device withrecording component for a follow-up study should be accomplished. Thedata are analyzed as above, and the appropriate actions taken.

FIG. 22 shows a method of diagnosing and treating a patient who reportsexcessive sleepiness and perhaps also snoring. Initially at step 150,the patient reports being excessively sleepy and possibly having snoringepisodes, perhaps raucous, raspy snoring with abrupt interruptions ofthe snoring sounds characteristic of obstructive apneic episodes. Atstep 152, the patient is instructed how to use the diagnostic device andhow to position the sensor(s). The diagnostic device collects flow data,and optionally, position and/or oximetry data. The data is collected ata rate sufficiently high to capture the details of each waveform. Forflow, a rate of fifty samples per second is appropriate, while positionand oximetry only require one sample per second each. The data file alsocontains information to correlate the data with time and date, sosleeping patterns can be ascertained.

Prior to the period of diagnostic sleep, the patient puts on thesensor(s), turns on the diagnostic device, and goes to sleep. When thepatient awakes in the morning, the patient turns the diagnostic deviceoff. During the period of sleep, the diagnostic device collects the dataas described above. If the diagnostic procedure is to be a multi-nightperiod of sleep, then the patient repeats this data collection phase forhowever many nights are required. At step 154, and after the requirednumber of nights of data collection, the patient returns the diagnosticdevice with the stored data. If the study will be extended, then thepatient removes the data storage module and returns only the module tothe physician.

The stored data are analyzed at step 156 to determine the amount andseverity of flow limitation, and the number and severity of apneas, ifany. This analysis can be performed either manually, or preferably by anautomated process such as the methods for determining flow limitation asdescribed heretofore. At step 158, a decision is then made as to whetherthe patient has flow limitation. If there is no evidence of flowlimiting or apnea in the stored data, then the patient is referred atstep 160 to a sleep lab for a more comprehensive study to determinewhether the patient has other problems such as restless legs syndrome,etc.

If flow limitation is present, or apneas are found, then the patient isinstructed how to use the self-adjusting controlled positive pressuretherapy device, step 162. The therapy device is equipped with a modulewhich collects and stores flow and pressure data, along with the(optional) position and oximetry data, as described above. Note thatthis step includes collecting data from a pressure sensor measuring thepressure at the airflow outlet of the therapy device. Such pressure datacould also be obtained from a pressure sensor connected to the patientattachment device (ADAM shell or nasal mask, etc.). Although lessdesirable because of the uncertainty of actual pressure at the patient,the pressure data could be replaced by data representing the blowerspeed, if the therapy device adjusts pressure by changing blower speed.The patient sleeps at home with the therapy device for the requirednumber of nights. During each night, the therapy device collects andstores the data as described above.

At step 164, the patient returns the therapy device or its data storagemodule for analysis of the stored data after the required number ofnights of data collection. Then, the stored flow data are analyzed atstep 166 to determine the amount and severity of flow limitation, andthe number and severity of apneas, if any exist. The flow limitationanalysis can be performed either manually, or preferably by an automatedprocess such as by the methods described heretofore. The stored pressuredata are analyzed at step 168 to determine the pressure required toalleviate flow limitations and apneas, and the distribution of requiredpressures during the diagnostic period of sleep. When the pressure datavalues are collected from the outlet of the therapy device, then thedata values can be corrected to reflect the estimated pressure at thenasal fitting if the resistance of the hose or tubing between the outletand the nasal fitting is known. For example,

P _(nose) =P _(outlet)−FLOW*RESISTANCE.

At step 170, a decision is made whether the analysis determines thatthere are still a significant number of sleep-disordered breathingepisodes during the night, and/or that the therapy device is incapableof alleviating such episodes at its highest pressure limit. Such a limitmay have been selected by the prescribing physician at a level less thanthe maximum capability of the therapy device. If the therapy device didnot restore normal breathing, then the patient is referred to a sleeplab for a more comprehensive study, step 160.

If the therapy device restores normal breathing patterns for thepatient, the pressure data are reviewed at step 172 for the properprescription of a controlled positive pressure therapy device. If thepeak therapy pressures fluctuate significantly, then the patient isprovided with a prescription for a self-adjusting controlled positivepressure therapy device for continued home use, step 174. To reducepatient cost, such a device would not necessarily incorporate the datastorage capabilities of the therapy device used for the previous stepsin this method. If, however, the pressure data show consistentnight-to-night peak pressures, and the maximum pressure used toalleviate sleep-disordered breathing events is relatively low, e.g.,eight centimeters of water pressure or less, then the patient would beprescribed conventional CPAP (non-self-adjusting) therapy, step 176.

While several particular forms of the invention have been illustratedand described, it will be apparent that various modifications can bemade without departing from the spirit and scope of the invention. Forexample, references to materials of construction and specific dimensionsare also not intended to be limiting in any manner and other materialsand dimensions could be substituted and remain within the spirit andscope of the invention. Accordingly, it is not intended that theinvention be limited, except as by the appended claims.

What is claimed is:
 1. A device for detecting flow limitation in anairway of a patient, comprising: a nasal fitting in fluid communicationwith the airway of the patient, the nasal fitting having an inletconfigured for receiving ambient air at atmospheric pressure; arestrictive element in fluid communication with the nasal fitting anddisposed between the airway of the patient and the inlet of the nasalfitting; a sensor in fluid communication with the nasal fitting andrestrictive element; a microprocessor operatively connected to thesensor and configured to define a waveform contour of an inspiratoryflow of ambient air to the patient and to generate first data valuesrepresentative of the waveform contour, wherein the microprocessor isconfigured to utilize the waveform contour to detect a flow limitationin the airway of the patient and to generate second data valuesrepresentative of the flow limitation; and a computer memory configuredto store the first data values and the second data values.
 2. The deviceof claim 1, wherein the microprocessor is further configured to generatethird data values representative of an expiratory flow of air from thepatient, and the computer memory is further configured to store thethird data values.
 3. The device of claim 1, wherein the microprocessorincludes processing means for correlating the first data values with asinusoidal contour.
 4. The device of claim 1, wherein the microprocessorincludes processing means for analyzing the first data values forflatness.
 5. The device of claim 1, wherein the microprocessor includesprocessing means for analyzing the first data values for respiratoryeffort.
 6. The device of claim 1, wherein the microprocessor includesprocessing means for analyzing the first data values for relative flowmagnitude.
 7. A device for detecting a flow limitation in an airway of apatient, comprising: means for restricting airflow to an airway of apatient, the means for restricting having a restrictive element disposedbetween the airway of the patient and an inlet of the means forrestricting, wherein the inlet is configured to receive ambient air atatmospheric pressure: means for sensing an inspiratory flow of ambientair to the patient, the means for sensing being in fluid communicationwith the means for restricting and configured to generate a signalcorresponding to a waveform contour of the inspiratory flow of ambientair; means for storing the signal corresponding to the waveform contour;and means for detecting a flow limitation in the airway of the patient,the means for detecting being configured to use the stored waveformcontour and to determine the amount of flow limiting.
 8. The device ofclaim 7, wherein the means for detecting is configured to generate datavalues representative of the stored waveform contour to correlate thedata values with a pure sine wave to determine a first index, to comparea regression fit of the data values with a regression fit of a pure sinewave to determine a second index, to compare a peak value of the datavalues with a peak value of a derivative of the data values to determinea third index, and to compare a peak value of the data values with anaverage of a plurality of peak flow values for flow limited breaths andwith an average of a plurality of peak flow values for non-flow limitedbreaths to determine a fourth index.
 9. The device of claim 8, whereinthe means for detecting is further configured to determine a fifth indexas a function of the first index, the second index, the third index andthe fourth index, wherein each index includes a weighted coefficient.10. A method for diagnosing a patient having obstructive sleep apnea,comprising: providing a patient with a diagnostic breathing devicehaving a flow restrictor positioned between the an inlet of thediagnostic breathing device and an airway of the patient, wherein theinlet is configured to receive ambient air at atmospheric pressure;generating first data values corresponding to a waveform contour of aninspiratory flow of ambient air to the patient; storing the first datavalues; analyzing the first data values to determine the presence of aflow limitation in the airway of the patient; and providing the patientwith a self-adjusting therapy breathing device when a flow limitation isdetected.
 11. The method of claim 10, further comprising: generatingsecond data values corresponding to a waveform contour of an inspiratoryflow of ambient air to the patient; generating third data valuescorresponding to a pressure in the airway of the patient; storing thesecond data values and the third data values; analyzing the second datavalues to determine the amount of flow limitation in the airway of thepatient; and providing the patient with a self-adjusting therapybreathing device when the third data values indicate large pressurefluctuations.